<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:set var="reportTitle" value="SPC Chart图His控制线报表" />

<%@ include file="/common/report_head.jsp" %>
<%@ include file="/condition/sartTime_input.html"%>
<%@ include file="/condition/endTime_input.html"%>
<%@ include file="/condition/fab_sumo_must.html"%>
<%@ include file="/condition/line_sumo.html"%>
<%@ include file="/condition/ope_sumo.html"%>
<%@ include file="/condition/tool_main_sumo.html"%>
<%@ include file="/condition/tool_sub_sumo.html"%>
<%@ include file="/condition/boatNumber_sumo.html"%>
<%@ include file="/condition/shift_sumo.html"%>
<%@ include file="/condition/controlChartGrp_sumo.html"%>
<%@ include file="/condition/controlChart_sumo.html"%>

<%@ include file="/common/report_middle.jsp" %>
<div class="col-md-12" style="height: 820px;">
    <div id="pqGrid"></div>
</div>
<%@include file="/common/report_end.jsp" %>


<script>
    $(document).ready(function () {
        $("title").text("SPC Chart图His控制线报表");
        $("label:contains('管制图组:')").addClass("keyCss");
        $("label:contains('管制图:')").addClass("keyCss");

        $('#query_btn').click(function (){
            if($("#controlChartGrpSumo").val() === null || $("#controlChartGrpSumo").val() === '' || $("#controlChartSumo").val() === null || $("#controlChartSumo").val() === ''){
                showErrorDialog("0000002", "管制图组和管制图为必选项"); return false;
            }
            initGridAndChart();
            ajax('/jn-report/report/spc_chart_his_report.do' ,loadConditionMapData(), true, ajax_successful);

            function ajax_successful(outTrxObj) {
                if(outTrxObj.gridData.length < 1) { showMessengerDialog("数据查询为空"); return false; }

                //grid表格数据
                var colM = [
                    {halign:"center",align:'center', dataIndx: 'chart_value',	         title: '点值',              width: 220,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'input_timestamp',	     title: '点值事件',          width: 220,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'chart_ucl',	         title: '上控制线',          width: 75,    editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'chart_usl',	         title: '上规格线',          width: 75,    editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'chart_target',	     title: '中心线',            width: 75,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'chart_lsl',	         title: '下规格线',          width: 75,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'chart_lcl',		     title: '下控制线',          width: 75,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'evt_timestamp',	     title: '规格线设置时间',    width: 220,   editable: false, sortable: true},
                ];
                _pqUtil.f.setColModel($("#pqGrid"), colM);
                _pqUtil.f.seTitle($("#pqGrid"), outTrxObj.gridTitle);
                _pqUtil.f.loadPqGridData($("#pqGrid"), outTrxObj.gridData);
            };
        });

    });
</script>
